home *** CD-ROM | disk | FTP | other *** search
/ Electronics Boutique Catalog 1996 Spring / 1996 Electronics Boutique Spring CD-ROM (USA).bin / eb / demos / ewjdemo.dir / 00107.ls < prev    next >
Encoding:
Text File  |  1995-12-11  |  2.4 KB  |  111 lines

  1. global gMovieSprite, gMovieDuration, gReturnFrame
  2.  
  3. on startMovie
  4.   unLoad()
  5.   unLoadCast()
  6.   set gMovieSprite to 20
  7.   preLoadCast(167)
  8. end
  9.  
  10. on legalButton whichSprite
  11.   repeat while the stillDown
  12.     set gReturnFrame to marker(0)
  13.     return 1
  14.   end repeat
  15. end
  16.  
  17. on stopAllQT
  18.   repeat with x = 1 to 48
  19.     if the type of sprite x > 0 then
  20.       if the castType of cast the castNum of sprite x = #digitalVideo then
  21.         set the movieRate of sprite x to 0
  22.       end if
  23.     end if
  24.   end repeat
  25. end
  26.  
  27. on find whichCast, startFrame, endFrame
  28.   repeat with x = startFrame to endFrame
  29.     go(x)
  30.     repeat with y = 1 to 48
  31.       if the type of sprite y > 0 then
  32.         if the castNum of sprite y = whichCast then
  33.           put "Cast member " & whichCast & " was found in frame " & x & ", in channel " & y & "."
  34.         end if
  35.       end if
  36.     end repeat
  37.   end repeat
  38. end
  39.  
  40. on delayFor howLong
  41.   set howLong to the timer + howLong
  42.   repeat while the timer < howLong
  43.     updateStage()
  44.   end repeat
  45. end
  46.  
  47. on returnFrame whichFrame
  48.   stopAllQT()
  49.   set whichSprite to gMovieSprite + 1
  50.   puppetSound("ReturnB")
  51.   repeat with x = 1 to 2
  52.     set the castNum of sprite whichSprite to the number of cast "returnArrow0"
  53.     updateStage()
  54.     delayFor(15)
  55.     set the castNum of sprite whichSprite to the number of cast "returnArrow1"
  56.     updateStage()
  57.     delayFor(15)
  58.   end repeat
  59.   blackFrame()
  60.   unLoad()
  61.   unLoadCast()
  62.   go(whichFrame)
  63. end
  64.  
  65. on pressButton whichSprite, whichSound, whichHighlightCast, whichFrame
  66.   stopAllQT()
  67.   puppetSound(whichSound)
  68.   repeat with x = 1 to 2
  69.     set the castNum of sprite whichSprite to the number of cast "MOREBON.GIF"
  70.     set the castNum of sprite 7 to the number of cast "text0"
  71.     updateStage()
  72.     delayFor(15)
  73.     set the castNum of sprite whichSprite to the number of cast "MOREBOFF.GIF"
  74.     set the castNum of sprite 7 to the number of cast whichHighlightCast
  75.     updateStage()
  76.     delayFor(15)
  77.   end repeat
  78.   blackFrame()
  79.   go(whichFrame)
  80. end
  81.  
  82. on blackFrame
  83.   repeat with x = 1 to 48
  84.     set the locV of sprite x to -500
  85.   end repeat
  86.   puppetTransition(50, 0, 12)
  87.   updateStage()
  88.   puppetTransition(0)
  89. end
  90.  
  91. on checkIt
  92.   when keyDown then checkKey
  93.   repeat while not (the shiftDown)
  94.     updateStage()
  95.   end repeat
  96. end
  97.  
  98. on checkKey
  99.   set userKey to the key
  100.   set userKeyCode to the keyCode
  101.   put userKey, userKeyCode
  102. end
  103.  
  104. on playSound whichSound
  105.   puppetSound(whichSound)
  106.   updateStage()
  107.   repeat while the soundBusy of 1
  108.     updateStage()
  109.   end repeat
  110. end
  111.